﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ExtBusiness.Admin;
using ExtBusiness.FlowOperation;
using WF_Business;

public partial class Xnjc_jxkh_step_form : PageBase
{
    public string userid = string.Empty;
    public string wname = string.Empty;
    public string stepName = string.Empty;
    public string timeFromOfAccept = string.Empty;
    public string timeToOfAccept = string.Empty;
    public System.Data.DataTable dtWorkFlowNames;
    protected string strhtml = string.Empty;

    protected void Page_Load(object sender, EventArgs e)
    {
        string userid = UserId;

        //判断当前登录用户是否为系统管理员
        bool ISsystemUser = SystemManager.IsSystemUser(userid);

         wname = Request["wname"];
         stepName = Request["stepName"];
         timeFromOfAccept = Request["timeFromOfAccept"];
         timeToOfAccept = Request["timeToOfAccept"];
        
        string strSql = string.Empty;
        if (!ISsystemUser)//不是系统管理员
        {
            strSql += @"select t.task  from xt_query_right t  where t.userid = '" + userid + "'";
            SysParams.OAConnection().RunSql(strSql, out dtWorkFlowNames);
        }

        else
        {
            ClsWorkFlow clsWorkFlow = new ClsWorkFlow();
            //获取业务名称
            dtWorkFlowNames = clsWorkFlow.GetFlowName();
        }

        foreach (System.Data.DataRow drName in dtWorkFlowNames.Rows)
        {
            strhtml = string.Format("<option value='{0}'>{0}</option>", drName[0]);
        }
    }
}
